import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory, IndexRoute } from 'react-router';
import App from './index';
import Welcome from './common/welcome'; //欢迎页面
import BannerManagePc from './homepage/banner_pc/banner'; //轮播管理
import FloorManagePc from './homepage/floor_pc/floor'; //楼层管理
import FloorDetail from './homepage/floor_pc/floorDetail'; //新增/编辑楼层
import AcitivityPc from './homepage/activity_pc/activity'; //专区管理
import RecommendPc from './homepage/recommend_pc/recommend'; //推荐管理
import BannerManageWx from './homepage/banner_wx/banner'; //轮播管理
import FloorManageWx from './homepage/floor_wx/floor'; //楼层管理
import FloorDetailWx from './homepage/floor_wx/floorDetail'; //新增/编辑楼层
import RecommendWx from './homepage/recommend_wx/recommend'; //推荐管理
import Allgoods from './goods/allgoods/allgoods'; //商品管理 全部商品管理
import GoodsDetail from './goods/allgoods/goodsDetail'; //商品管理 商品详情
import GoodsHistoricalPrice from './goods/allgoods/goodsHistoricalPrice'; //商品管理 商品详情
import Goodsinfo from './goods/goodsinfo/goodsinfo'; //商品管理 商品信息库管理
import GoodsLabel from './goods/goodsLabel/goodsLabel'; //商品管理 商品标签管理
import Goodsrelevance from './goods/goodsrelevance/goodsrelevance'; //商品管理 商品关联管理
import RelationDetail from './goods/goodsrelevance/relationdetail';//商品管理 新增/编辑关联
import RelationProduct from './goods/goodsrelevance/relationproduct';//商品管理 关联商品
import FrontEnd from './goods/frontEnd/frontEnd';//商品管理 前端分类管理
import BackEnd from './goods/backEnd/backEnd';//商品管理 后端分类管理
import Brand from './goods/brand/brandinfo'; //品牌管理
import Keyword from './goods/keyword/keyword'; //全局关键字管理
import PickWeek from './goods/PickWeek/PickWeek'; //推荐分类管理
import SeoLabel from './goods/SeoLabel/SeoLabel'; //seo标签管理
import FrontAndBack from './goods/frontAndBack/frontAndBack';//商品管理 前端与后端分类对应管理
import Advertising from './marketing/advertising/advertising';//营销管理 广告管理
import AdvertisingDetail from './marketing/advertising/advertisingDetail';//营销管理 广告管理 新增
import Special from './marketing/special/special';//营销管理 专场管理 
import SpecialDetail from './marketing/special/specialDetail';//营销管理 专场管理 新增
import Activity from './marketing/activity/activity';//营销管理 活动管理
import ActivityDetail from './marketing/activity/activityDetail';//营销管理 活动管理 新增
import Navigation from './marketing/navigation/navigation';//营销管理 导航管理
import NavigationDetail from './marketing/navigation/navigationDetail';//营销管理 导航管理 新增
import Message from './marketing/message/message';//营销管理 消息管理
import MessageDetail from './marketing/message/messageDetail';//营销管理 消息管理 新增
import Recommended from './marketing/recommended/recommended';//营销管理 推荐管理
import RecommendedDetail from './marketing/recommended/recommendedDetail';//营销管理 推荐管理 新增
import Layoutd from './marketing/layoutd/layoutd';//营销管理 页面布局配置
import LayoutdDetail from './marketing/layoutd/layoutdDetail';//营销管理 页面布局配置 新增
import OrderList from './orders/orderlist/orderList'; //订单管理 全部订单
import OrderDetail from './orders/orderlist/orderDetail'; //订单管理 全部订单详情  ApplyOperation
import ApplyOperation from './orders/orderlist/applyOperation'; //订单管理 全部订单的待客申请操作 
import Inspection from './orders/inspection/inspection'; //订单管理 远程审单
import Prescription from './orders/prescription/prescription'; //订单管理 处方订单
import PrescriptionDetail from './orders/prescription/prescriptionDetail'; //处方订单详情
import ApplyOrderList from './orders/applyOrderList/applyOrderList'; //订单管理 申请列表
import ApplyOrderDetail from './orders/applyOrderList/applyOrderDetail'; // 申请列表 订单详情
import RefundOrderList from './orders/refundOrderList/refundOrderList'; // 退款列表
import RefundOrderDetail from './orders/refundOrderList/refundOrderDetail'; // 退款列表 订单详情
import Userlist from './manager/userlist'; //会员管理 会员列表
import Settings from './settings/settings'; //系统设置
import Postage from './settings/postage/postage'; //邮费设置
import PostageDetail from './settings/postage/postageDetail'; //邮费详情设置
import CrmGoods from './CRM/crmGoods/crmGood'; //直销商品管理
import CrmUserlist from './CRM/crmUser/crmUserlist/crmUserlist'; //会员管理列表
import CrmUserlistDetails from './CRM/crmUser/crmUserlist/crmUserlistDetails'; //会员管理列表详情
import CrmAddCrmUser from './CRM/crmUser/crmAddCrmUser/crmAddCrmUser'; //新增会员
import CrmGuestChannel from './CRM/crmSetting/crmGuestChannel/crmGuestChannel'; //客户来源设置
import CrmWhitelist from './CRM/crmSetting/crmWhitelist/crmWhitelist'; //白名单设置
import CrmDeposit from './CRM/crmSetting/crmDeposit/crmDeposit'; //订金支付类型设置
import CrmSetOrder from './CRM/crmOrder/setOrder/setOrder'; // CRM新建订单
import CrmOrderDetail from './CRM/crmOrder/crmOrderDetail/crmOrderDetail'; // CRM订单详情
import CrmSendList from './CRM/crmOrder/crmSendList/crmSendList'; // 直销发货列表
import CrmOrderlist from './CRM/crmOrder/crmOrderlist/crmOrderlist'; // 直销发货列表
import PrintOutboundOrder from './CRM/crmOrder/crmSendList/printOutboundOrder';
import Achievement from './CRM/crmStatistics/achievement/achievement'; //统计分析 业绩统计
import ExpressClassify from './CRM/crmStatistics/expressClassify/expressClassify'; //统计分析 快递分类统计
import ProductSales from './CRM/crmStatistics/productSales/productSales'; //统计分析 产品销售统计
//权限模块
import Authority from './privilege/authority/authority'; //权限配置
import Department from './privilege/department/department'; //权限配置分类里面的部门管理
import DepartmentAuth from './privilege/department/departmentAuth'; //分配部门权限
import DepartmentAllAuth from './privilege/department/departmentAllAuth'; //部门详情
import Roles from './privilege/roles/roles'; //权限配置分类里面的角色管理
import RolesAuth from './privilege/roles/rolesAuth'; //分配角色权限
import RolesAllAuth from './privilege/roles/rolesAllAuth'; //角色详情
import User from './privilege/user/user'; //权限配置分类里面的员工管理
import UserAuth from './privilege/user/userAuth'; //分配员工权限
import UserAllAuth from './privilege/user/userAllAuth'; //员工详情
import UserAdd from './privilege/user/userAdd'; //权限配置分类里面的员工管理 新增员工
import UserEdit from './privilege/user/userEdit'; //权限配置分类里面的员工管理 新增员工
//橘色小工具
import MyApplyList from './juseLittleTool/applyList/myApplyList'; //橘色小工具 我的申请列表
import RefundList from './juseLittleTool/applyList/refundList'; //橘色小工具 我的申请列表
import AfterApproveList from './juseLittleTool/approveList/afterApproveList'; //橘色小工具 已审批列表
import BeforeApproveList from './juseLittleTool/approveList/beforeApproveList'; //橘色小工具 未审批列表
import ChannelListBeforeApprove from './juseLittleTool/approveList/channelListBeforeApprove'; //橘色小工具 未审批列表
import ChannelListAfterApprove from './juseLittleTool/approveList/channelListAfterApprove'; //橘色小工具 未审批列表
import EverydayBudget from './juseLittleTool/budgetManage/everydayBudget'; //橘色小工具 每日预算列表
import ChannelList from './juseLittleTool/channelManage/channelList'; //橘色小工具 渠道管理列表
import AllRefundList from './juseLittleTool/channelManage/allRefundList'; //橘色小工具 所有退费列表
import ChannelManage from './juseLittleTool/budgetManage/channelManage'; //橘色小工具 预算管理列表
import FileManage from './juseLittleTool/fileManage/fileManage'; //橘色小工具 预算管理列表
//换号小工具
import ChangeNumberInterfaceForm from './changeNumberLittleTool/changeNumberManage/changeNumberInterface'; //换号小工具
//微信管理
import ActivityManage from './wechat/ZMLsmallPro/activityManage'; //小程序活动管理
import UserManage from './wechat/ZMLsmallPro/userManage'; //小程序用户管理
import Poster from './wechat/ZMLsmallPro/poster'; //脂玫乐海报图
import Userdetails from './wechat/ZMLsmallPro/userdetails'; //小程序用户详情
import ActivityManagedetails from './wechat/ZMLsmallPro/activityManagedetails'; //小程序活动详情
//官网管理
//谷医堂
import Information_gyt from './officialWebsite_gyt/information/information'; //谷方益元官网新闻详情
import InformationList_gyt from './officialWebsite_gyt/information/informationList'; //谷方益元官网新闻列表
//谷方益元
import Information_gfyy from './officialWebsite/information/information'; //谷方益元官网新闻详情
import InformationList_gfyy from './officialWebsite/information/informationList'; //谷方益元官网新闻列表
import Merchandise_gfyy from './officialWebsite/merchandise/merchandise'; //谷方益元官网产品管理
import MerchandiseList_gfyy from './officialWebsite/merchandise/merchandiseList'; //谷方益元官网产品管理新增
import Consultant_gfyy from './officialWebsite/consultant_gfyy/consultant_gfyy' //谷方益元官网产品资讯顾问
import Consultant_gfyy_change from './officialWebsite/consultant_gfyy/consultant_gfyy_change'
import Consultant_gfyy_detail from './officialWebsite/consultant_gfyy/consultant_gfyy_detail'
import Hot_product_gfyy from './officialWebsite/hot_product_gfyy/hot_product_gfyy' //谷方益元热卖商品
import Hot_product_gfyy_add from './officialWebsite/hot_product_gfyy/hot_product_gfyy_add' //谷方益元热卖商品添加
//脂玫乐
import Information_zml from './officialWebsite_zml/information/information'; //脂玫乐官网新闻详情
import InformationList_zml from './officialWebsite_zml/information/informationList'; //脂玫乐官网新闻列表
import Merchandise_zml from './officialWebsite_zml/merchandise/merchandise'; //脂玫乐官网产品管理
import MerchandiseList_zml from './officialWebsite_zml/merchandise/merchandiseList'; //脂玫乐官网产品管理新增
import CaseEdit_zml from './officialWebsite_zml/caseEdit/caseEdit';
import CaseEditChange_zml from './officialWebsite_zml/caseEdit/caseEditChange';
import CaseEdit_zml_detail from './officialWebsite_zml/caseEdit/caseDetail';
import Consultant_zml from './officialWebsite_zml/consultant_zml/consultant_zml' //脂玫乐资讯顾问
import Consultant_zml_change from './officialWebsite_zml/consultant_zml/consultant_zml_change'//脂玫乐修改
//在线问诊
import OnlineInquiry from './onlineInquiry/onlineInquiry'; //在线问诊
//支付中心
import PaymentOrder from './payment/paymentOrder/paymentOrder'; //支付订单
import ApplicationCash from './payment/applicationCash/applicationCash'; //提现申请
//健康调养
import CategoryManage from './healthAftercare/categoryManage/categoryManage';
import DiseaseManage from './healthAftercare/diseaseManage/diseaseManage';
import NurseManage from './healthAftercare/nurseManage/nurseManage';

//综合平台
import PlatformBanner from './integratedPlatform/banner/banner';
import IndexDoctor from './integratedPlatform/indexDoctor/indexDoctor';
import ChooseIndexDoctor from './integratedPlatform/indexDoctor/chooseIndexDoctor';
import IndexGoods from './integratedPlatform/indexGoods/indexGoods';
import ChooseIndexGoods from './integratedPlatform/indexGoods/chooseIndexGoods';
//运营后台用户管理
import BusinessBackUserManage from './businessBackUser/userManage/userManage';
import BusinessBackDoctorManage from './businessBackUser/doctorManage/doctorManage';

import "babel-polyfill";//引入babel插件兼容es6内置语法 如includes
import './style/index.less';
// import registerServiceWorker from '../registerServiceWorker';//缓存服务文件 开启本地的一个server worker 放最后

class Index extends React.Component {
  render() {
    return (
      <Router history={hashHistory}>
        <Route path='/' component={App}>
          <IndexRoute component={Welcome} />
          <Route path='/bannarPc' component={BannerManagePc} />
          <Route path='/floorPc' component={FloorManagePc} />
          <Route path='/floordetail/:floorid' component={FloorDetail} />
          <Route path='/activityPc' component={AcitivityPc} />
          <Route path='/recommendPc' component={RecommendPc} />
          <Route path='/bannarWx' component={BannerManageWx} />
          <Route path='/floorWx' component={FloorManageWx} />
          <Route path='/floordetailWx/:floorid' component={FloorDetailWx} />
          <Route path='/recommendWx' component={RecommendWx} />
          <Route path='/allGoods' component={Allgoods} />
          <Route path='/goodsdetail/:productid' component={GoodsDetail} />
          <Route path='/goodsHistoricalPrice/:productid' component={GoodsHistoricalPrice} />
          <Route path='/goodsInfo' component={Goodsinfo} />
          <Route path='/goodsLabel' component={GoodsLabel} />
          <Route path='/goodsrelevance' component={Goodsrelevance} />
          <Route path='/frontEnd' component={FrontEnd} />
          <Route path='/backEnd' component={BackEnd} />
          <Route path='/brand' component={Brand} />
          <Route path='/keyword' component={Keyword} />
          <Route path='/pickWeek' component={PickWeek} />
          <Route path='/seoLabel' component={SeoLabel} />
          <Route path='/frontAndBack' component={FrontAndBack} />
          <Route path='/advertising' component={Advertising} />
          <Route path='/advertisingDetail/:advertisingDetailid' component={AdvertisingDetail} />
          <Route path='/special' component={Special} />
          <Route path='/specialDetail/:specialDetail' component={SpecialDetail} />
          <Route path='/activity' component={Activity} />
          <Route path='/activityDetail/:activityDetail' component={ActivityDetail} />
          <Route path='/navigation' component={Navigation} />
          <Route path='/navigationDetail/:navigationDetail' component={NavigationDetail} />
          <Route path='/message' component={Message} />
          <Route path='/messageDetail/:messageDetail' component={MessageDetail} />
          <Route path='/recommended' component={Recommended} />
          <Route path='/recommendedDetail/:recommendedDetail' component={RecommendedDetail} />
          <Route path='/layoutd' component={Layoutd} />
          <Route path='/layoutdDetail/:layoutdDetail' component={LayoutdDetail} />
          <Route path='/relationdetail/:relationid' component={RelationDetail} />
          <Route path='/relationproduct' component={RelationProduct} />
          <Route path='/orderlist' component={OrderList} />
          <Route path='/orderDetail/:orderId' component={OrderDetail} />
          <Route path='/applyOperation/:orderId' component={ApplyOperation} />
          <Route path='/inspection' component={Inspection} />
          <Route path='/applyOrderList' component={ApplyOrderList} />
          <Route path='/applyOrderDetail/:orderId' component={ApplyOrderDetail} />
          <Route path='/refundOrderList' component={RefundOrderList} />
          <Route path='/refundOrderDetail/:orderId' component={RefundOrderDetail} />
          <Route path='/prescription' component={Prescription} />
          <Route path='/prescriptionDetail/:orderId' component={PrescriptionDetail} />
          <Route path='/viplist' component={Userlist} />
          <Route path='/setting' component={Settings} />
          <Route path='/postage' component={Postage} />
          <Route path='/postageDetail/:postageId' component={PostageDetail} />
          <Route path='/crmGoods' component={CrmGoods} />
          <Route path='/crmUserlist' component={CrmUserlist} />
          <Route path='/crmUserlistDetails/:userid' component={CrmUserlistDetails} />
          <Route path='/crmAddCrmUser' component={CrmAddCrmUser} />
          <Route path='/crmGuestChannel' component={CrmGuestChannel} />
          <Route path='/crmWhitelist' component={CrmWhitelist} />
          <Route path='/crmDeposit' component={CrmDeposit} />
          <Route path='/crmSetOrder' component={CrmSetOrder} />
          <Route path='/crmSetOrder/:userId' component={CrmSetOrder} />
          <Route path='/crmorderdetail/:orderId' component={CrmOrderDetail} />
          <Route path='/crmSendList' component={CrmSendList} />
          <Route path='/crmOrderlist' component={CrmOrderlist} />
          <Route path='/achievement' component={Achievement} />
          <Route path='/expressClassify' component={ExpressClassify} />
          <Route path='/productSales' component={ProductSales} />
          {/* 橘色小工具 */}
          <Route path='/myApplyList' component={MyApplyList} />
          <Route path='/refundList' component={RefundList} />
          <Route path='/afterApproveList' component={AfterApproveList} />
          <Route path='/beforeApproveList' component={BeforeApproveList} />
          <Route path='/channelListBeforeApprove' component={ChannelListBeforeApprove} />
          <Route path='/channelListAfterApprove' component={ChannelListAfterApprove} />
          <Route path='/everydayBudget' component={EverydayBudget} />
          <Route path='/channelList' component={ChannelList} />
          <Route path='/allRefundList' component={AllRefundList} />
          <Route path='/budgetManage' component={ChannelManage} />
          <Route path='/fileManage' component={FileManage} />
          {/*换号小工具 */}
          <Route path='/changeNumberInterface' component={ChangeNumberInterfaceForm} />
          {/* 权限模块 */}
          <Route path='/department' component={Department} />
          <Route path='/departmentAuth' component={DepartmentAuth} />
          <Route path='/departmentAllAuth' component={DepartmentAllAuth} />
          <Route path='/roles' component={Roles} />
          <Route path='/rolesAuth' component={RolesAuth} />
          <Route path='/rolesAllAuth' component={RolesAllAuth} />
          <Route path='/authority' component={Authority} />
          <Route path='/userAdd' component={UserAdd} />
          <Route path='/userEdit' component={UserEdit} />
          <Route path='/user' component={User} />
          <Route path='/userAllAuth' component={UserAllAuth} />
          <Route path='/userAuth' component={UserAuth} />
          {/* 微信模块 */}
          <Route path='/activityManage' component={ActivityManage} />
          <Route path='/userManage' component={UserManage} />
          <Route path='/userdetails' component={Userdetails} />
          <Route path='/activityManagedetails' component={ActivityManagedetails} />
          <Route path='/poster' component={Poster} />
          {/* 官网模块 */}
          {/* 谷医堂 */}
          <Route path='/informationList_gyt' component={InformationList_gyt} />
          <Route path='/information_gyt/:state' component={Information_gyt} />
          {/* 谷方益元 */}
          <Route path='/informationList_gfyy' component={InformationList_gfyy} />
          <Route path='/information_gfyy/:state' component={Information_gfyy} />
          <Route path='/merchandiseList_gfyy' component={MerchandiseList_gfyy} />
          <Route path='/merchandise_gfyy/:state' component={Merchandise_gfyy} />
          <Route path='/consultant_gfyy' component={Consultant_gfyy} />
          <Route path='/consultant_gfyy/:state' component={Consultant_gfyy_change} />
          <Route path='/consultant_gfyy_detail' component={Consultant_gfyy_detail} />
          <Route path='/hot_product_gfyy' component={Hot_product_gfyy} />
          <Route path='/hot_product_gfyy_add' component={Hot_product_gfyy_add} />
          {/* 脂玫乐 */}
          <Route path='/informationList_zml' component={InformationList_zml} />
          <Route path='/information_zml/:state' component={Information_zml} />
          <Route path='/merchandise_zml' component={Merchandise_zml} />
          <Route path='/merchandiseList_zml/:state' component={MerchandiseList_zml} />
          <Route path='/caseedit_zml' component={CaseEdit_zml} />
          <Route path='/caseedit_zml/:state' component={CaseEditChange_zml} />
          <Route path='/caseedit_zml_detail' component={CaseEdit_zml_detail} />

          {/* <Route path='/merchandise' component={Merchandise} />
          <Route path='/merchandiseList/:state' component={MerchandiseList} /> */}
          {/* <Route path='/officialWebsite' component={OfficialWebsite} />
          <Route path='/officialWebsiteList/:state' component={OfficialWebsiteList} /> */}
          <Route path='/merchandiseList_zml' component={MerchandiseList_zml} />
          <Route path='/merchandise_zml/:state' component={Merchandise_zml} />
          <Route path='/consultant_zml' component={Consultant_zml} />
          <Route path='/consultant_zml/:state' component={Consultant_zml_change} />
          {/* 在线问诊模块 */}
          <Route path='/onlineInquiry' component={OnlineInquiry} />
          {/* 支付订单模块 */}
          <Route path='/paymentOrder' component={PaymentOrder} />
          <Route path='/applicationCash' component={ApplicationCash} />
          {/* 健康调养 */}
          <Route path='/categoryManage' component={CategoryManage} />
          <Route path='/diseaseManage' component={DiseaseManage} />
          <Route path='/nurseManage' component={NurseManage} />
          {/*综合平台*/}
          <Route path='/platformBanner' component={PlatformBanner}/>
          <Route path='/indexDoctor' component={IndexDoctor}/>
          <Route path='/chooseIndexDoctor' component={ChooseIndexDoctor}/>
          <Route path='/indexGoods' component={IndexGoods}/>
          <Route path='/chooseIndexGoods/:proId' component={ChooseIndexGoods}/>
          {/*运营后台用户管理*/}
          <Route path='/businessBackUserManage' component={BusinessBackUserManage} />
          <Route path='/businessBackDoctorManage' component={BusinessBackDoctorManage} />
        </Route>
        <Route path='/printOutboundOrder/:orderList' component={PrintOutboundOrder} />
      </Router>
    )
  }
}

ReactDOM.render(<Index />, document.getElementById("main"));
// registerServiceWorker();